﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="subject"
    targetNamespace="http://tempuri.org/subject.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/subject.xsd"
    xmlns:mstns="http://tempuri.org/subject.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
    <xs:element name="departments">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="department" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="name" maxOccurs="1" minOccurs="1">
                                
                            </xs:element>
                            <xs:element name="chname" type="xs:string" maxOccurs="1" minOccurs="0" />
                            <xs:element name="desc" type="xs:string" maxOccurs="1" minOccurs="0" />
                            <xs:element name="career" type="xs:string" maxOccurs="1" minOccurs="0"  />
                            <xs:element name="common" type="xs:string" maxOccurs="1" minOccurs="0" />
                            <xs:element name="majors" maxOccurs="1" minOccurs="1">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="major" maxOccurs="unbounded" minOccurs="0">
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element type="xs:string" name="name" minOccurs="1" maxOccurs="1" />
                                                    <xs:element type="xs:string" name="desc" minOccurs="0" maxOccurs="1" />
                                                    <xs:element type="xs:string" name="career" minOccurs="0" maxOccurs="1" />
                                                    <xs:element type="xs:string" name="target" minOccurs="0" maxOccurs="1" />
   
                                                    <xs:element name="subjects" minOccurs="1" maxOccurs="1" type="xs:string" />
                                                </xs:sequence>
                                                <xs:attribute name="name" type="xs:string" use="required" />
                                                <xs:attribute name="new" type="xs:boolean" use="optional" />
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="name" type="xs:string"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
